package com.rimi.mapper;

import com.rimi.bean.YqzcUser;
import com.rimi.model.dto.ShippingAddressDto;

import java.util.List;

/**
 * @Author luc
 * @Date 2021/6/16
 */
public interface UserMapper {
    
    YqzcUser findUserByUserPhoneNumber(String userPhoneNumber);

    YqzcUser findUserByEmail(String userEmail);

    YqzcUser findUserByCompany(String infoCompanyName);

    YqzcUser findUserById(Integer id);

    int addUser(YqzcUser yqzcUser);

    int updateUserById(Integer id, String userPhoneNumber);

    /**
     * 查询默认的收货地址
     * @param userId 用户ID
     * @return 地址
     */
    List<ShippingAddressDto> findDefaultAddress(Integer userId);
    /**
     * 查询默认的收货地址
     * @param userId 用户ID
     * @return 地址
     */
    String findDefaultAddressInfo(Integer userId);
}
